package com.guaju.yueshangLife.bean;

import android.text.TextUtils;

public class OrderJudgeUtil {
    private static String refundStatus = "";
    private static String orderStatus = "";
    private static String orderDetailStatus = "";
    private static String shipStatus = "";

    public static String getRefundStatus(String refund_status) {
        if (TextUtils.equals(refund_status, "pending")) {
            refundStatus = "未退款";
        } else if (TextUtils.equals(refund_status, "applied")) {
            refundStatus = "已申请退款";
        } else if (TextUtils.equals(refund_status, "processing")) {
            refundStatus = "退款中";
        } else if (TextUtils.equals(refund_status, "success")) {
            refundStatus = "退款成功";
        } else if (TextUtils.equals(refund_status, "failed")) {
            refundStatus = "退款失败";
        }
        return refundStatus;
    }

    public static String getOrderStatus(int order_status) {

        switch (order_status) {
            case 0:
                orderStatus = "已取消";
                break;
            case 1:
                orderStatus = "待付款";
                break;
            case 2:
                orderStatus = "已付款，等待发货";
                break;
            case 3:
                orderStatus = "已发货，待收货";
                break;
            case 4:
                orderStatus = "已完成";
                break;
            case 5:
                orderStatus = "已申请退款,等待商家处理";
                break;
            case 6:
                orderStatus = "退款中";
                break;
            case 7:
                orderStatus = "已退款";
                break;
            case 8:
                orderStatus = "退款失败";
                break;
        }
        return orderStatus;
    }

    public static String getOrderDetailStatus(int order_status) {

        switch (order_status) {
            case 0:
                orderDetailStatus = "已取消";
                break;
            case 1:
                orderDetailStatus = "待付款";
                break;
            case 2:
                orderDetailStatus = "已付款，等待发货";
                break;
            case 3:
                orderDetailStatus = "已发货";
                break;
            case 4:
                orderDetailStatus = "已完成";
                break;
            case 5:
                orderDetailStatus = "等待商家处理";
                break;
            case 6:
                orderStatus = "商家已收货，等待退款";
                break;
            case 7:
                orderStatus = "商家已退款";
                break;
            case 8:
                orderStatus = "商家拒绝申请，请重新提交";
                break;
        }
        return orderDetailStatus;
    }

    public static String getShipStatus(String ship_status) {
        if (TextUtils.equals(ship_status, "pending")) {
            shipStatus = "未发货";
        } else if (TextUtils.equals(ship_status, "delivered")) {
            shipStatus = "已发货";
        } else if (TextUtils.equals(ship_status, "received")) {
            shipStatus = "已收货";
        }
        return shipStatus;
    }


}
